<h1>MorphBitmapFill</h1>

<p>MorphBitmapFill uses a bitmap image to fill an area of a morphing shape. Two types of bitmap fill are supported:</p>

<div style="padding-left:20px; margin-bottom:10px;">
<ul>
<li>Clipped - the image is placed in the middle of the area to be filled. If the area to be filled is larger
than the image then the colour at the edge of the image is used to fill the remaining area.</li>
<li>Tiled - the image is tiled across the area to be filled.</li>
</ul>
</div>

<table>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Size</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top">type</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">8</td>
<td>The type of bitmap fill, either Tiled (type=64), Unsmoothed Tiled (type=66),
Clipped (type=65) or Unsmoothed Clipped (type=66).</td>
</tr>

<tr>
<td nowrap valign="top">identifier</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">16</td>
<td>The unique identifier of the image that will be displayed.</td>
</tr>

<tr>
<td nowrap valign="top">startTransform</td>
<td nowrap valign="top">CoordTransform</td>
<td nowrap valign="top" align="right">&nbsp;</td>
<td>An optional CoordTransform that will be applied to the image, to change its 
origin, orientation, etc., at the start of the morphing process.</td>
</tr>

<tr>
<td nowrap valign="top">endTransform</td>
<td nowrap valign="top">CoordTransform</td>
<td nowrap valign="top" align="right">&nbsp;</td>
<td>An optional CoordTransform that will be applied to the image, to change its 
origin, orientation, etc., at the end of the morphing process.</td>
</tr>

</table>

<p>The bitmap is referenced using the identifier obtained from an instance of an 
DefineJPEGImage, DefineJPEGImage2, DefineJPEGImage3, DefineImage or DefineImage2. 
Only one image can be displayed throughout the morphing process.</p>

<p>When an image is loaded its width and height default to twips rather than pixels. 
An image 300 x 200 pixels will be displayed as 300 x 200 twips (15 x 10 pixels). 
Scaling the image by 20 (20 twips = 1 pixel) would restore it to its original size. 
The CoordTransform in the FSBitmapFill object can be used to scale the 
image to its original size.</p>

<p>The image is drawn with the top left corner at the origin of the shape being 
filled so the scaling transform must be composited with the translation transform that places the image at the desired location within the shape.</p>

<h2>History</h2>

<p>MorphBitmapFill represents the MorphFillStyle structure from the Macromedia Flash (SWF) File Format Specification. Shape morphing was introduced in Flash 3.</P>
